Revert "ANDROID: virtio: disable virtio_dma_buf callback checks with CFI" This reverts commit 2e05fcdfd4efae54c6d556294092425faf3e8b42. Bug: 467084221 Change-Id: I6955475aaa35d7e8d49925d937ede321bae492a8 Signed-off-by: T.J. Mercier <tjmercier@google.com>
diff --git a/drivers/virtio/virtio_dma_buf.c b/drivers/virtio/virtio_dma_buf.c index 9f4ef2f..3034a2f 100644 --- a/drivers/virtio/virtio_dma_buf.c +++ b/drivers/virtio/virtio_dma_buf.c
@@ -25,14 +25,11 @@ struct dma_buf *virtio_dma_buf_export const struct virtio_dma_buf_ops, ops); if (!exp_info->ops || + exp_info->ops->attach != &virtio_dma_buf_attach || !virtio_ops->get_uuid) { return ERR_PTR(-EINVAL); } - if (!(IS_ENABLED(CONFIG_CFI_CLANG) && IS_ENABLED(CONFIG_MODULES)) && - exp_info->ops->attach != &virtio_dma_buf_attach) - return ERR_PTR(-EINVAL); - return dma_buf_export(exp_info); } EXPORT_SYMBOL(virtio_dma_buf_export); @@ -63,9 +60,6 @@ EXPORT_SYMBOL(virtio_dma_buf_attach); */ bool is_virtio_dma_buf(struct dma_buf *dma_buf) { - if (IS_ENABLED(CONFIG_CFI_CLANG) && IS_ENABLED(CONFIG_MODULES)) - return true; - return dma_buf->ops->attach == &virtio_dma_buf_attach; } EXPORT_SYMBOL(is_virtio_dma_buf);